import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        redirect: '/index'
    },
    {
        path: '/index',
        name: 'index',
        component: () => import('@/views/index/index')
    },
    {
        path: '/portrait',
        name: 'portrait',
        component: () => import('@/views/portrait/index')
    },
    {
        path: '/news',
        name: 'news',
        component: () => import('@/views/news/index')
    },
    {
        path: '/newsdetail',
        name: 'newsdetail',
        component: () => import('@/views/news/detail/index')
    },
    {
        path: '/contact',
        name: 'contact',
        component: () => import('@/views/contact/index')
    },
    {
        path: '/cooperation',
        name: 'cooperation',
        component: () => import('@/views/cooperation/index')
    }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
